package components;

public class Coordinate {

	protected float lattitude; 	//Y
	protected float longtitude;	//X
	
	public Coordinate(){
		lattitude = 0f;
		longtitude = 0f;
	}
	
	public Coordinate(float lattitude, float longtitude){
		this.lattitude = lattitude;
		this.longtitude = longtitude;
	}
	
	public Coordinate(int lattitude, int longtitude){
		this.lattitude = milisecondsToDegrees(lattitude);
		this.longtitude = milisecondsToDegrees(longtitude);
	}
	
	public static float milisecondsToDegrees(int milisecond){
		float degree;
		
		degree = milisecond/1000; //to second
		degree /= 3600; //to degrees (3600=60*60)
		
		return degree;
	}

	public float getLattitude() {
		return lattitude;
	}

	public void setLattitude(float lattitude) {
		this.lattitude = lattitude;
	}

	public float getLongtitude() {
		return longtitude;
	}

	public void setLongtitude(float longtitude) {
		this.longtitude = longtitude;
	}
	
}
